package com.example.petshopping.ui.orders.model;

public class Order {
    public static final int STATUS_PENDING_PAYMENT = 1; // 待付款
    public static final int STATUS_PENDING_SHIPMENT = 2; // 待发货
    public static final int STATUS_PENDING_RECEIPT = 3; // 待收货
    public static final int STATUS_COMPLETED = 4; // 已完成
    public static final int STATUS_REFUND = 5; // 退款/售后
    public static final int STATUS_PENDING_CONFIRM = 6; // 待确认

    private String id; // 待确认订单id
    private String storeName; // 店铺名称
    private int storeAvatarResId; // 店铺头像资源ID（备用）
    private String storeAvatarUrl; // 店铺头像URL（优先使用）
    private int status; // 待确认订单状态
    private String productTitle; // 商品标题
    private int productImageResId; // 商品图片资源ID（备用）
    private String productImageUrl; // 商品图片URL（优先使用）
    private String price; // 商品价格
    private int quantity; // 商品数量
    private String totalAmount; // 总金额


    private String auctionItemId;

    // Additional fields for order details
    private String orderTime; // 待确认订单时间
    private String paymentMethod; // 支付方式
    private String salePrice; // 销售价格
    private String discount;
    private String otherDiscount; // 其他折扣
    private String shippingFee; // 运费
    private String otherFee; // 其他费用
    private String address;
    private String contact;

    public Order() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public int getStoreAvatarResId() {
        return storeAvatarResId;
    }

    public void setStoreAvatarResId(int storeAvatarResId) {
        this.storeAvatarResId = storeAvatarResId;
    }

    public String getStoreAvatarUrl() {
        return storeAvatarUrl;
    }

    public void setStoreAvatarUrl(String storeAvatarUrl) {
        this.storeAvatarUrl = storeAvatarUrl;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getProductTitle() {
        return productTitle;
    }

    public void setProductTitle(String productTitle) {
        this.productTitle = productTitle;
    }

    public int getProductImageResId() {
        return productImageResId;
    }

    public void setProductImageResId(int productImageResId) {
        this.productImageResId = productImageResId;
    }

    public String getProductImageUrl() {
        return productImageUrl;
    }

    public void setProductImageUrl(String productImageUrl) {
        this.productImageUrl = productImageUrl;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getStatusText() {
        switch (status) {
            case STATUS_PENDING_PAYMENT:
                return "待付款";
            case STATUS_PENDING_SHIPMENT:
                return "待发货";
            case STATUS_PENDING_RECEIPT:
                return "待收货";
            case STATUS_COMPLETED:
                return "已完成";
            case STATUS_REFUND:
                return "退款/售后";
            case STATUS_PENDING_CONFIRM:
                return "待确认";
            default:
                return "";
        }
    }

    // Getters and setters for additional fields
    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public String getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(String salePrice) {
        this.salePrice = salePrice;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public String getOtherDiscount() {
        return otherDiscount;
    }

    public void setOtherDiscount(String otherDiscount) {
        this.otherDiscount = otherDiscount;
    }

    public String getShippingFee() {
        return shippingFee;
    }

    public void setShippingFee(String shippingFee) {
        this.shippingFee = shippingFee;
    }

    public String getOtherFee() {
        return otherFee;
    }

    public void setOtherFee(String otherFee) {
        this.otherFee = otherFee;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getAuctionItemId() {
        return auctionItemId;
    }

    public void setAuctionItemId(String auctionItemId) {
        this.auctionItemId = auctionItemId;
    }
} 